<div class="layuimini-container">
    <div class="" id="stepForm" lay-filter="stepForm" style="margin: 0 auto">
        <div carousel-item>

            <!-- 基础信息 -->
            <div class="layuimini-container base step">
            <form id="app-form" class="layui-form layuimini-form">
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品分类</label>
                        <div class="layui-input-block">
                            <select name="cate_id" lay-verify="required" data-select="{:url('/addons/mall/cate/index')}" data-fields="id,title" data-value="{$row.cate_id|default=''}">
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="{$row.title|default=''}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label required">商品LOGO</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="logo" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传分类图片" value="{$row.logo|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="logo" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                                <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_logo" data-upload-select="logo" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label required">商品图片</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="images" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品图片" value="{$row.images|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="images" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                                <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_images" data-upload-select="images" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">虚拟销量</label>
                        <div class="layui-input-block">
                            <input type="text" name="virtual_sales" class="layui-input" lay-verify="required" placeholder="请输入虚拟销量" value="{$row.virtual_sales|default=''}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">分类排序</label>
                        <div class="layui-input-block">
                            <input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="{$row.sort|default=''}">
                        </div>
                    </div>
                    <div class="layui-form-item text-center">
                        <div class="layui-input-block right">
                            <div class="layui-btn  layui-btn-normal next layui-btn-sm" lay-filter="formStep">
                                &emsp;下一步&emsp;
                            </div>
                        </div>
                    </div>
            </form>

            </div>

                <!-- 规格 -->
                <div class="layuimini-container spec step hide">
            <form class="layui-form layuimini-form">
                   
                    <div class="layui-form-item">
                        <label class="layui-form-label">类型</label>
                        <div class="layui-input-block">
                          <input type="radio" name="spec_type" value="one" title="单规格" {if condition="$row.spec_type eq 'one'"}checked{/if}>
                          <input type="radio" name="spec_type" value="more" title="多规格" {if condition="$row.spec_type eq 'more'"}checked{/if}>
                        </div>
                     </div>
                    <div class="layui-form-item one hide">
                        <div class="layui-form-item">
                            <label class="layui-form-label">市场价格</label>
                            <div class="layui-input-block">
                                <input type="text" name="market_price" class="layui-input" lay-verify="required" placeholder="请输入市场价格" value="{$row.market_price|default=''}">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">折扣价格</label>
                            <div class="layui-input-block">
                                <input type="text" name="discount_price" class="layui-input" lay-verify="required" placeholder="请输入折扣价格" value="{$row.discount_price|default=''}">
                            </div>
                        </div>
                    </div>
                    
                    <div class="more hide">
                        {include file="../addons/mall/view/goods/spec_edit.html" /}
                    </div>

                 <div class="layui-form-item text-center">
                        <div class="layui-input-block right">
                             <div class="layui-btn  layui-btn-primary pre layui-btn-sm" lay-filter="formStep">
                                &emsp;上一步&emsp;
                            </div>
                            <div class="layui-btn  layui-btn-normal next layui-btn-sm" lay-filter="formStep">
                                &emsp;下一步&emsp;
                            </div>
                        </div>
                    </div>
            </form>
            </div>

                <!-- 详情 -->
                <div class="layuimini-container info step hide">
            <form class="layui-form layuimini-form">
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品描述</label>
                        <div class="layui-input-block">
                            <textarea id="describe" rows="20" class="layui-textarea editor" placeholder="请输入商品描述" name="">{$row.describe|raw|default=''}</textarea>
                            <input type="hidden" name="describe" class="describe">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">备注信息</label>
                        <div class="layui-input-block">
                            <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$row.remark|default=''}</textarea>
                        </div>
                    </div>
                    <div class="hr-line"></div>
                    
               <div class="layui-form-item text-center right">
                         <div class="layui-btn  layui-btn-primary pre layui-btn-sm" lay-filter="formStep">
                            &emsp;上一步&emsp;
                        </div>
                        <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm submit" data-url="add">提交</button>
                    </div>
            </form>
             </div>
        </div>
    </div>
</div>
<link rel="stylesheet" href="__STATIC__/plugs/lay-module/step-lay/step.css" media="all">
<style type="text/css">
.right {
    float: right;
}
.hide{
    display: none;
}

</style>
<script type="text/javascript">
    var $ = layui.$
    var spec_type = "{$row.spec_type}"

    $('.'+spec_type).removeClass('hide')
</script>